package com.flitsneak.designpatterns.behavioralpatterns.memento;

import java.util.Stack;

/**
 * @author flitsneak
 * @email flitsneak@gmail.com
 * @date 2022/7/19 14:08
 * @description
 */
public class LickDogDiary {
    private final Stack<LickDogMemento> stack = new Stack<>();

    public LickDogMemento getMemento() {
        return stack.pop();
    }

    public void addMemento(LickDogMemento lickDogMemento) {
        stack.push(lickDogMemento);
    }
}
